namespace 防沉迷倒计时
{
    public partial class Form1 : Form
    {
        DateTime t = DateTime.Parse("1900-01-01");
        public Form1()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            timer1.Enabled = false;
         }

        private void timer1_Tick(object sender, EventArgs e)
        {
            t = t.AddSeconds(-1);
            labeTime.Text = t.ToString("mm:ss");
        }

        private void button1_Click(object sender, EventArgs e)
        {
            t = t.AddMinutes(double.Parse(numericUpDown1.Value.ToString()));
            timer1.Enabled = true;
        }
    }
}